package com.example.bookKeep.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bookKeep.entity.Process;
import com.example.bookKeep.request.BookListRequest;
import com.example.bookKeep.vo.ProcessPurchaserVO;
import com.example.bookKeep.vo.ProcessStatisticsVO;
import com.example.bookKeep.vo.StatisticsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProcessMapper extends BaseMapper<Process> {

    List<String> listPurchaser();

    List<Process> listByRequest(BookListRequest bookListRequest);

    ProcessStatisticsVO homeStatistics(@Param("ym") String ym);

    List<StatisticsVO> purchaserMonthReceivedStatistics(@Param("ym") String ym);

    List<StatisticsVO> purchaserMonthSendStatistics(@Param("ym") String ym);

    List<StatisticsVO> purchaserYearReceivedStatistics(@Param("y") String y);

    List<StatisticsVO> purchaserYearSendStatistics(@Param("y") String y);

    List<ProcessPurchaserVO> listByPurchasers(BookListRequest bookListRequest);

    void updateSettlement(@Param("purchaser") String purchaser);
}